cd /d %~dp0
set port=%1
netstat -nao | grep -P "0.0.0.0:%port%\D"
netstat -nao | grep -P "\[::\]:%port%\D"
netstat -nao | grep -P "0.0.0.0:%port%\D" |  grep -Po "\d+$" | xargs  -ipid taskkill /PID  pid /f
netstat -nao | grep -P "\[::\]:%port%\D" |  grep -Po "\d+$" | xargs  -ipid taskkill /PID  pid /f